public class plant {

    String name;
    int hp;
    int attack;

    public plant(String name, int hp, int attack){
        this.name = name;
        this.hp = hp;
        this.attack = attack;
    }

    public void attacks(zombie js){
        System.out.println(this.name+"攻击僵尸");
        js.hp -= this.attack;
        System.out.println("僵尸的血量为："+js.hp);
    }
}
